Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace "os.getlogin()" with "pwd.getpwuid(os.getuid())" #33

Merged
merged 1 commit into from Jun 1, 2015
Merged

replace "os.getlogin()" with "pwd.getpwuid(os.getuid())" #33

merged 1 commit into from Jun 1, 2015

Conversation

conradkleinespel
Copy link
Contributor

@conradkleinespel conradkleinespel commented Jun 1, 2015

Hello everyone,

I am setting up Open IO in Docker. In the process, I notice that using os.getlogin() does not work if the user that executes the program is not logged in via the login command. More generally, it seems like getlogin() is not too reliable and getpwuid(getuid()) seems to be a better way to do the same thing: http://stackoverflow.com/questions/4785126/getlogin-c-function-returns-null-and-error-no-such-file-or-directory

Does this change make sense ? Does getlogin do something getpwuid(getuid()) doesn't do ?

Best regards,
Conrad

Hello everyone,

I am setting up Open IO in Docker. In the process, I notice that using `os.getlogin()` does not work if the user that executes the program is not logged in via the `login` command. More generally, it seems like `getlogin()` is not too reliable and `getpwuid(getuid())` seems to be a better way to do the same thing: http://stackoverflow.com/questions/4785126/getlogin-c-function-returns-null-and-error-no-such-file-or-directory

Best regards,
Conrad
jfsmig added a commit that referenced this issue Jun 1, 2015
replace "os.getlogin()" with "pwd.getpwuid(os.getuid())"
@jfsmig jfsmig merged commit 713bbaf into open-io:master Jun 1, 2015
@conradkleinespel conradkleinespel deleted the patch-1 branch Jun 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants